/**
 * @ author: 汪孟苹
 */
define(['jquery','template','bch/app/selfRecord/selfRecord.servers','bch/template/selfRecord/selfRecord.tpl'],function($,template,$servers,tpl){
	var ui = {};

	var drawInfo = function(data){
		return template("selfRecord_info",data);
	}
	var drawTooth = function(data){
		return template("selfRecord_tooth",data);
	}

	ui.info = function(options){
		$("#" + options.id).html(tpl.info());
		var h = drawInfo($servers.handleInfo(options.data));
		$("#" + options.id).html(h);
	}
	ui.tooth = function(options){
		$("#" + options.id).html(tpl.tooth());
		var h = drawTooth($servers.handleTooth(options.list));
		$("#" + options.id).html(h);
	}

	return ui;
});